const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  devServer: {
    proxy: {
      '/ibps': {
        target: 'https://www.airace.com.cn',
        changeOrigin: true,
      //   pathRewrite: {
      //     '^/api': ''
      // }
      }
    }
  },
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {
        additionalData: '@use "@/assets/style/base.scss" as *;'
        // additionalData(content, loaderContext) {
        //   const { resourcePath, rootContext } = loaderContext;
        //   const relativePath = path.relative(rootContext, resourcePath);
        //   if (
        //     relativePath.replace(/\\/g, "/") !== "src/assets/style/base.scss"
        //   ) {
        //     return '@import "@/assets/style/base.scss";' + content;
        //   }
        //   return content;
        // },
      },
    },
  },
});
